/**
 * Created by jerry on 2017/11/13.
 * 用户相关api
 */
import * as API from './'

export default {
  // WEB后端登录
  login: params => {
    return API.POST('/login/userLogin', params)
  },
  //登出
  logout: params => {
    return API.GET('/api/v1/users/logout', params)
  },
  //修改个人信息
  changeProfile: params => {
    return API.POST('/user/addOrUpdUser', params)
  },

  //查询获取user列表(通过page分页)
  findList: params => {
    return API.GET('/user/getAllUser', params)
  },
  // 添加用户
  addUser: params => {
    return API.POST('/user/addOrUpdUser', params)
  },
  // 删除用户
  delUser: params => {
    return API.DELETE('/user/delUser', params)
  },
  //获取
  getById: params => {
    return API.GET('/user/getById', params)
  },
  //查询获取列表(远程搜索)
  qryBySelect: params => {
    return API.GET('/user/qryBySelect', params)
  },
  updatePwd: params => {
    return API.POST('/user/updatePwd', params)
  },
  getUserInfo: params => {
    return API.GET('/user/userInfo', params)
  },
  updateMeInfo: params => {
    return API.POST('/user/updateMeInfo', params)
  },
  getUserQrCodeUrl: params => {
    return API.GET('/user/getQrcodeUrl', params)
  },
  // 管理员重置密码
  resetPassword: params => {
    return API.POST('/user/resetPassword', params)
  }
}
